package com.goldman.aplt.service.seq;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.goldman.aplt.entity.seq.MspSequenceBuilder;
import com.goldman.aplt.repo.seq.MspSequenceBuilderMapper;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zw
 * @since 2023-09-20
 */
@CacheConfig(cacheNames = "${systemId}:MspSequenceBuilderService")
@Service
public class MspSequenceBuilderService extends ServiceImpl<MspSequenceBuilderMapper, MspSequenceBuilder> {
    @Cacheable
    public List<MspSequenceBuilder> selListBySeqCode(String seqCode) {
        QueryWrapper<MspSequenceBuilder> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("seq_code",seqCode);
        queryWrapper.orderByAsc("data_sort");
        return this.list(queryWrapper);
    }
}
